package com.ny.USB;

class Laptop {
    public void run(){
        System.out.println("笔记本运行");
    }
    public void shutdown(){
        System.out.println("笔记本关机");
    }
    public void useUSB(Mouse usb){
         usb.open();
         if(usb instanceof Mouse){
             Mouse mouse=(Mouse)usb;
             mouse.click();
         } else if (usb instanceof Keyboard) {
             Keyboard keyboard= (Keyboard) usb;
             keyboard.strike();

         }
         usb.close();
    }
}
